Scheduler: T1310544 — scrollTo does not take offset into account#32160
Merged
Tucchhaa merged 13 commits intoDevExpress:26_1from Jan 16, 2026
Merged
Scheduler: T1310544 — scrollTo does not take offset into account#32160Tucchhaa merged 13 commits intoDevExpress:26_1from
Tucchhaa merged 13 commits intoDevExpress:26_1from
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where the Scheduler's scrollTo method does not properly account for the viewOffset option. The fix modifies the scroll coordinate calculation logic to find the closest cell when the exact date is not found, and updates the scroll date validation to consider the view offset.
Changes:
- Added
findClosestparameter tofindGlobalCellPositionto find the closest cell when exact date match is not found - Updated
_isValidScrollDateto considerviewOffsetwhen validating scroll dates - Simplified
_getScrollCoordinatesby removing hours/minutes parameters and using the closest cell's data - Added comprehensive test coverage for different offset scenarios (positive, negative, zero)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/testcafe-models/scheduler/index.ts | Added getCellDataAtViewportCenter() helper method for tests and refactored scrollTo() method |
| packages/devextreme/js/__internal/scheduler/workspaces/view_model/m_view_data_provider.ts | Added findClosest parameter to find closest cell, extracted getCellPosition helper, refactored date comparison logic |
| packages/devextreme/js/__internal/scheduler/workspaces/m_work_space.ts | Simplified _getScrollCoordinates signature, added viewOffset consideration in _isValidScrollDate() |
| e2e/testcafe-devextreme/tests/scheduler/common/scrollTo.ts | Added comprehensive test cases for scrollTo with different offset values |
packages/devextreme/js/__internal/scheduler/workspaces/view_model/m_view_data_provider.ts
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/scheduler/workspaces/m_work_space.ts
Outdated
Show resolved
Hide resolved
sjbur
approved these changes
Jan 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.